package com.itheima.domain;

import java.util.List;
import java.util.StringJoiner;

public class User {
    //对应用户表列名变量
    private Integer id;
    private String username;

    private List<Orders> list;
    public User() {
    }

    public User(Integer id, String username, List<Orders> list) {
        this.id = id;
        this.username = username;
        this.list = list;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public List<Orders> getList() {
        return list;
    }

    public void setList(List<Orders> list) {
        this.list = list;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", User.class.getSimpleName() + "[", "]")
                .add("id=" + id)
                .add("username='" + username + "'")
                .add("list=" + list)
                .toString();
    }
}
